<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录界面</title>

</head>
<body>
 <%
          Cookie[] cookie = request.getCookies();
          String uname = "";
          String upwd = "";
          if(cookie!=null){
          for(Cookie c:cookie){
        	  if("uname".equals(c.getName())){
        		  uname = URLDecoder.decode(c.getValue(),"utf-8");
        	  }else if("upwd".equals(c.getName())){
        		  upwd = c.getValue();
        	  }
          }
          }
          request.setAttribute("uname", uname);
          request.setAttribute("upwd", upwd);


%> 
<div style="background-image: url('../img/12.jpg ');width:1500px;height: 700px; text-align:center">
			        <div style="text-align: center;font-size: 30px;">
					
					   .
					
					</div>
		
		  <div style=" width:400px;height: 300px;border: 1px solid red; margin-top: 100px;margin-left: 550px;">
			<form  action="${pageContext.request.contextPath }/login" method="post">
				    <br><br><br>西瓜瓜通讯录登录<br><br>
				    <div><span style="color: red;">${error }</span></div>
				    <div>用户名：<input type="text" name="uname" value="${uname }" /> </div><br />
					<div>密码：<input type="password" name="upwd" value="${upwd }" /></div><br />
				    <div><input type="submit" value="登录" />&nbsp;&nbsp;&nbsp;
				     <input type="reset" value="重置" /></div>
				
			</form>
			</div>
	</div>
	
</body>
</html>